import React, {useState} from 'react';
import RouterView from "@/routes/routerView";

function Home(props) {

  let [arrList, setArrList] = useState(['宝贝', '小公举', '太平公主', '小仙女', '领导', '大哥', '老大']);
  return (
    <div>
      <h1>hello</h1>
      <button onClick={() => {
        setArrList(['老公', '小哥哥', '雅蠛蝶', '大宝贝', '大猪蹄子'])
      }}>修改State
      </button>

      <ul>
        {
          arrList.map((item, index) => <li key={item}>
            {item}
          </li>)
        }
      </ul>
      <RouterView routes={props.children}/>
    </div>
  )
}

export default Home;
